package com.lyz.collectionDemo.collection;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;

/**
 * @ClassName CollectionD1
 * @Description Collection
 * @Author 2214361854
 * @Date 2022/2/21 14:07
 * @Version 1.0
 */
public class CollectionD1 {
    public static void main(String[] args) {
        //有序
        Collection list = new ArrayList();
        list.add("java");
        list.add("set");

        //无序
        Collection set = new HashSet();
        set.add("java");
        set.add("123");
        System.out.println(set);


    }
}
